<?php
class resource_file_row extends system_concept_row {
	
	/**
	 * @return resource_file_type
	 */
	public function getType() {
		return new resource_file_type($this->get('type'));
	}

	/**
	 * @return resource_file_row
	 */
	public function setType($type) {
		$_type = new resource_file_type();
		if(!$_type->has($type)) {
			$this->set('type', 0);
		} else {
			$this->set('type', $_type->getId($type));
		}
		return $this;
	}
	
}
